<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
</head>
<body>
    <table>
        <tr>
            <th>序号</th>
            <th>姓名</th>
            <th>邮箱</th>
            <th>年龄</th>
            <th>角色</th>
        </tr>
        <tr th:each="person,status : ${personList}">
            <td th:text="${person.id}"></td>
            <td th:text="${person.userName}">姓名</td>
            <td th:text="${person.email}">邮箱</td>
            <td th:text="${person.age > 18 ? '成年' : '未成年'}">年龄</td>
            <td th:text="${person.role}">角色</td>
            <!--元素的索引位置-->
            <td th:text="${status.index}"></td>
            <th th:text="${status.count}"></th>
            <!--当前便利元素-->
            <th th:text="${status.current}"></th>
        </tr>
    </table>

    <!-- 选项 1：jQuery 和 Bootstrap 集成包（集成了 Popper） -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-7ymO4nGrkm372HoSbq1OY2DP4pEZnMiA+E0F3zPr+JQQtQ82gQ1HPY3QIVtztVua" crossorigin="anonymous"></script>
</body>
</html>